package com.sanjin.service;

import com.sanjin.entity.ParkOrder;

import java.util.List;


/**
 * @description:
 * @author: sanjin
 * @date: 2019/5/8 11:12
 */
public interface ParkOrderService {

    /**
     * 新建订单
     * @param order 没有id，包含 wxMiniUserId
     * @return
     */
    ParkOrder createOrder(ParkOrder order);

    /**
     * 支付订单
     * @param orderId 订单id
     * @return
     */
    ParkOrder payOrder(Integer orderId, Integer wxMiniUserId);

    /**
     * 取消订单
     * @param orderId
     * @param wxMiniUserId
     * @return
     */
    ParkOrder cancelOrder(Integer orderId, Integer wxMiniUserId);

    /**
     * 获取所有订单
     * @return
     */
    List<ParkOrder> getAllOrders();

    ParkOrder queryOrderByOrderId(Integer orderId);

    /**
     * 查询用户未支付的订单
     * @param wxMiniUserId
     * @return
     */
    ParkOrder queryNonPayOrderByWxMiniUserId(Integer wxMiniUserId);
}
